from rest_framework.serializers import ModelSerializer
from . import models





class CountryProductModelSerializer(ModelSerializer):
    class Meta:
        model = models.Country
        fields = [
            'name',
            'pk',
            'img',
            'product_list',
        ]


class PlaceSerializer(ModelSerializer):
    class Meta:
        model = models.Place
        fields = [
            'name',
            'product_list'
        ]

class ProductSerializers(ModelSerializer):
    class Meta:
        model = models.Product
        fields = [
            'title',
            'cover',
            'desc',
            'price',
            'pk',
            'place',
            'product_country',
            'discount',
            'product_banner',
            'product_category',
            'place_name',
            'product_category_name',

        ]

class ProductRetSerializers(ModelSerializer):
    class Meta:
        model = models.Product
        fields = [
            'title',
            'desc',
            'price',
            'pk',
            'place',
            'product_banner',
            'detail',
            'route',
            'start_place',
            'traffic',
            'period',

        ]

